package com.hospital.doctor.service;

import com.hospital.doctor.mapper.PrescriptionMapper;
import com.hospital.doctor.pojo.Prescription;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PrescriptionServiceImpl implements  PrescriptionService {

    @Autowired
    private PrescriptionMapper prescriptionMapper;

    @Override
    public Prescription selectAllBypIdbb(int pId) {
        return prescriptionMapper.selectAllBypIdbb(pId);
    }

    @Override
    public List<Prescription> selectAllBypId(int pId) {
        return prescriptionMapper.selectAllBypId(pId);
    }

    @Override
    public int stopPrescription(int prId) {
        return prescriptionMapper.stopPrescription(prId);
    }

    @Override
    public int insertPrescription(Prescription prescription) {

        return prescriptionMapper.insertPrescription(prescription);
    }


}
